{extend name="../../base/view/common/base" /}
{block name="style"}
{include file="/approve/add_style" /}
{/block}
<!-- 主体 -->
{block name="body"}
<form class="layui-form p-4" lay-filter="demo-val-filter">
<table class="layui-table">
    <tr>
        <td class="layui-td-gray">申请人</td>
        <td>{$info.createUser|default=''}</td>
        <td class="layui-td-gray">审批类型</td>
        <td>{$info.spTitle|default=''}</td>
    </tr>
    <tr>
        <td class="layui-td-gray">审批结果</td>
        <td>{$info.statusText}</td>
        <td class="layui-td-gray">状态</td>
        <td>{$info.read_time>0?"已阅":"未阅"}</td>
    </tr>
</table>
    {if $info.read_time==0}
    <div style="padding: 10px 0">
        <a href="javascript:" class="layui-btn layui-btn-normal" onclick="yd('{$info.id}')">阅读</a>
    </div>
    {/if}
</form>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script>

    const moduleInit = ['tool','employeepicker','oaTool'];
    function gouguInit() {
        var form = layui.form,
            tool=layui.tool,
            oaTool=layui.oaTool,
            laydate = layui.laydate;


    }

    function yd(id='') {
        httpRequest("{:url('readed')}",{id:id},function (res) {
            if (res.code==0){
                layui.tool.sideClose(1000);
            }
        })
    }
</script>
{/block}
<!-- /脚本 -->